﻿<Window x:Class="UIComposition.Shell.Views.ShellView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:regions="http://www.codeplex.com/CompositeWPF"
        Title="ShellView"
        Height="480"
        Width="800">
    <Window.Resources>
        <Style x:Key="ContentControlRegionStyle"
               TargetType="ContentControl">
            <Setter Property="Foreground"
                    Value="#FF000000" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Left" />
            <Setter Property="VerticalContentAlignment"
                    Value="Top" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ContentControl">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <Border Grid.Row="0"
                                    CornerRadius="4,4,0,0"
                                    BorderBrush="#FF0254B4"
                                    BorderThickness="1"
                                    VerticalAlignment="Top">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1"
                                                         StartPoint="0.5,0">
                                        <GradientStop Color="#FF6777A0"
                                                      Offset="0" />
                                        <GradientStop Color="#FF2A3358"
                                                      Offset="1" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <TextBlock Text="{TemplateBinding Name}"
                                           TextWrapping="Wrap"
                                           HorizontalAlignment="Center"
                                           Foreground="#FFD9E3CF"
                                           FontWeight="Normal"
                                           FontFamily="Portable User Interface"
                                           FontSize="12"
                                           VerticalAlignment="Center" />
                            </Border>
                            <ContentPresenter Grid.Row="1"
                                              Cursor="{TemplateBinding Cursor}"
                                              ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.Background>
            <RadialGradientBrush>
                <GradientStop Color="#FF80B3D4" />
                <GradientStop Color="#FF456AB4"
                              Offset="1" />
            </RadialGradientBrush>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"
                              MinWidth="200" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="3*" />
        </Grid.ColumnDefinitions>

        <!-- App Banner -->
        <Canvas x:Name="Banner"
                Grid.Row="0"
                Grid.Column="0"
                Grid.ColumnSpan="3"
                RenderTransformOrigin="0.5,0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </Canvas.RenderTransform>
            <TextBlock Canvas.Top="10"
                       Canvas.Left="15"
                       Text="Prism "
                       TextWrapping="NoWrap"
                       Foreground="#FFBBD3EF"
                       FontSize="48"
                       Opacity="0.7"
                       TextAlignment="Left"
                       FontWeight="Bold" />
            <TextBlock Canvas.Top="15"
                       Canvas.Left="210"
                       Text="UI Composition QuickStart"
                       TextWrapping="NoWrap"
                       Foreground="#FFC8D5DE"
                       FontSize="40"
                       Opacity="0.85"
                       TextAlignment="Left"
                       FontWeight="Normal"
                       RenderTransformOrigin="0.5,0.5">
                <TextBlock.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1.25"
                                        ScaleY="1.25" />
                        <SkewTransform />
                        <RotateTransform />
                        <TranslateTransform />
                    </TransformGroup>
                </TextBlock.RenderTransform>
            </TextBlock>
        </Canvas>

        <!-- Left Region -->
        <Border Grid.Row="1"
                BorderBrush="#FF4355C1"
                BorderThickness="2,2,2,2"
                CornerRadius="4,4,4,4"
                Margin="8,2,2,8">
            <ContentControl x:Name="LeftRegion"
                            regions:RegionManager.RegionName="LeftRegion"
                            Style="{StaticResource ContentControlRegionStyle}"
                            VerticalContentAlignment="Stretch"
                            HorizontalContentAlignment="Stretch" />
        </Border>

        <!-- Main Region -->
        <Border Margin="2,2,8,8"
                Grid.Column="2"
                Grid.Row="1"
                BorderThickness="2,2,2,2"
                CornerRadius="4,4,4,4"
                BorderBrush="#FF4355C1"
                Grid.RowSpan="2">
            <ContentControl x:Name="MainRegion"
                            regions:RegionManager.RegionName="MainRegion"
                            Style="{StaticResource ContentControlRegionStyle}"
                            VerticalContentAlignment="Stretch"
                            HorizontalContentAlignment="Stretch" />
        </Border>

        <GridSplitter Grid.Row="1"
                      Grid.Column="1"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Stretch"
                      Background="{x:Null}"
                      Grid.RowSpan="2" />
    </Grid>
</Window>
